<?php  

/**
* 
*/
class IntegerField extends BaseTableField
{
  
  protected $_size=8;
  protected $_type='INTEGER';
  
  protected function _initialize($options){
    
  }
  
  public function generateCreateScript(){
    return '`'.$this->_name.'` '.$this->_type.($this->_notNull==true ? ' NOT NULL ' : ' ');
  }
  
  public function setValue($value){
    if((int)$value>$this->_size){
      $this->_validationError='Max Size is '.$this->_size;
      return;
    }
    $this->_value = (int)$value;
  }
}


?>